import React, { useEffect, useState } from "react";
import { history } from 'umi'
import profile from './components/image/profile.jpg'
import Title from '../../../wechatEdit/components/Drawer/components/DraweiCenter/components/Title'
import './index.less'
export const PersonalCenter = (props) => {
    const { data } = props
    const userInfo = {}
    const [] = useState([])
    const { username = 'king' } = userInfo
    const render = {
        user: <div className="PersonalCenter_banner_content">
            <div className="PersonalCenter_top_profile">
                <img src={profile} />
            </div>
            <div className="PersonalCenter_top_body">
                <div className="PersonalCenter_top_PersonalCentername">{username}</div>
            </div>
        </div>,
        task: <div className="PersonalCenter_tabs_label">
            <div className="PersonalCenter_c_box PersonalCenter_c_icon1"></div>
            <div className="PersonalCenter_c_box PersonalCenter_c_icon2"></div>
            <div className="PersonalCenter_c_box PersonalCenter_c_icon3" ></div>
        </div>,
        order: <div className="PersonalCenter_tabs_box">
            <div className="PersonalCenter_tabs" >
                <div className="PersonalCenter_label_icon1  PersonalCenter_label"></div>
                <div className="PersonalCenter_value">全部订单</div>
            </div>
            <div className="PersonalCenter_tabs">
                <div className="PersonalCenter_label_icon2  PersonalCenter_label"></div>
                <div className="PersonalCenter_value">待付款</div>
            </div>
            <div className="PersonalCenter_tabs" >
                <div className="PersonalCenter_label_icon3  PersonalCenter_label"></div>
                <div className="PersonalCenter_value">已完成</div>
            </div>


            <div className="PersonalCenter_tabs
  "
            >
                <div className="PersonalCenter_label_icon4  PersonalCenter_label"></div>
                <div className="PersonalCenter_value">已关闭</div>
            </div>
        </div>,
        tools: <div className="PersonalCenter_tool">
            <div className="PersonalCenter_tool_list">我的收藏</div>
        </div>
    }
    return <div className="PersonalCenter_box">
        <Title data={{ title: '主页' }}></Title>
        {data.map(val => {
            const { key } = val
            if (key) {
                return render[key]
            }
            return null
        })}
    </div>
}
export default PersonalCenter